package com.diver.flinkdemo.entity.xxt;


import com.diver.flinkdemo.utils.ObjectUtils;

/**
 * 2018/10/31
 * Created by Lynn Li.
 */
public class DayExercise implements java.io.Serializable,Comparable<DayExercise> {

    // 序列化版本
    private static final long serialVersionUID = -9223372036854775808L;

    // 唯一标识 [主键]
    private String id;
    // 学生卡id
    private String studentCardId;
    // 步数
    private String step;
    // 班级排名
    private Integer rank;
    // 距离
    private String distance;
    // 消耗热量
    private String heat;
    // 学校id
    private String schoolId;
    // 学校名称
    private String schoolName;
    // 年级id
    private String gradeId;
    // 年级名称
    private String gradeName;
    // 班级名称
    private String className;
    // 创建时间
    private Long createTime;

    @Override
    public String toString() {
        return "DayExercise{" + "id='" + id + '\'' + ", studentCardId='" + studentCardId + '\'' + ", step='" + step + '\'' + ", rank=" + rank
                + ", distance='" + distance + '\'' + ", heat='" + heat + '\'' + ", schoolId='" + schoolId + '\'' + ", schoolName='" + schoolName + '\''
                + ", gradeId='" + gradeId + '\'' + ", gradeName='" + gradeName + '\'' + ", className='" + className + '\'' + ", createTime=" + createTime + '}';
    }

    /**
     * 获取唯一标识 [主键]
     *
     * @return 唯一标识
     */
    public String getId() {
        return id;
    }

    /**
     * 设置唯一标识 [主键]
     *
     * @param id 唯一标识
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取学生卡id
     *
     * @return 学生卡id
     */
    public String getStudentCardId() {
        return studentCardId;
    }

    /**
     * 设置学生卡id
     *
     * @param studentCardId 学生卡id
     */
    public void setStudentCardId(String studentCardId) {
        this.studentCardId = studentCardId;
    }

    /**
     * 获取步数
     *
     * @return 步数
     */
    public String getStep() {
        return step;
    }

    /**
     * 设置步数
     *
     * @param step 步数
     */
    public void setStep(String step) {
        this.step = step;
    }

    /**
     * 获取班级排名
     *
     * @return 班级排名
     */
    public Integer getRank() {
        return rank;
    }

    /**
     * 设置班级排名
     *
     * @param rank 班级排名
     */
    public void setRank(Integer rank) {
        this.rank = rank;
    }

    /**
     * 获取距离
     *
     * @return 距离
     */
    public String getDistance() {
        return distance;
    }

    /**
     * 设置距离
     *
     * @param distance 距离
     */
    public void setDistance(String distance) {
        this.distance = distance;
    }

    /**
     * 获取消耗热量
     *
     * @return 消耗热量
     */
    public String getHeat() {
        return heat;
    }

    /**
     * 设置消耗热量
     *
     * @param heat 消耗热量
     */
    public void setHeat(String heat) {
        this.heat = heat;
    }

    /**
     * 获取创建时间
     *
     * @return 创建时间
     */
    public Long getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public String getGradeId() {
        return gradeId;
    }

    public void setGradeId(String gradeId) {
        this.gradeId = gradeId;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public int compareTo(DayExercise de) {
        Integer sp1 = 0;
        if(!ObjectUtils.isEmpty(this.getStep())){
            sp1 = Integer.valueOf(this.getStep());
        }
        Integer sp2 = 0;
        if(!ObjectUtils.isEmpty(de.getStep())){
            sp2 = Integer.valueOf(de.getStep());
        }
        return sp2 - sp1;
    }

}
